package com.jiangore.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Todo
 * @Author jiangtao
 * @CreateBy 2020-03-10 10:46 PM
 * @UpdateBy jiangtao
 * @Version v1.0
 */
//@Slf4j
@RestController
public class TestController {

    private static final Logger log = LoggerFactory.getLogger(TestController.class);

    @RequestMapping("index")
    public String index() {
        log.debug("debug log ------------------");
        log.info("info log -------------");
        log.warn("我是中文警告日志 ------------");

        log.warn("我是{}中文{}警告日志 ------------", "dsdsd", 444);
        log.warn(String.format("我是%s中文%d警告日志 ------------", "dsdsd", 444));

        log.error("error log ------", new Exception("error"));

        return "index";
    }
}
